package org.jeecg.glr.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.glr.entity.GlrGateway;

import java.util.List;

/**
 * @Description: 网关管理
 * @Author: jeecg-boot
 * @Date:   2020-03-05
 * @Version: V1.0
 */
public interface GlrGatewayMapper extends BaseMapper<GlrGateway> {


    @Select("select * from glr_gateway where gate_way_code=#{code}")
    GlrGateway getGlrGatewayByCode(String code);


    @Select("${sql}")
    List<String> getGlrGatewayStatus(@Param("sql")String sql);
    @Select("${sql}")
    List<GlrGateway> getGlrGatewaySelect(@Param("sql")String sql);
    @Select("select count(*) from glr_light where gate_way_code=#{code}")
    public int getGlrDataWayLightCount(@Param("code")String code);

}
